package com.rs.game.player.dialogues;


public class CaptainJute extends Dialogue{

	private int npcId;
	
	@Override
	public void start() {
		npcId = (Integer) parameters[0];
			sendNPCDialogue(npcId, 9827, "Hey you! Yes, you! Wanna help me out, mate? My trolls are escaping, I'll reward you, if you succeed." );	
	}

	@Override
	public void run(int interfaceId, int componentId) {
		if (stage == -1) {
			stage = 0;
			sendOptionsDialogue("Help the Captain?", "Yes", "No");
		} else if (stage == 0) {
			if (componentId == OPTION_1) {
				if (player.trollReward = true) {
				player.getControlerManager().startControler("TrollInvasion", true);
				end();
				} else {
					player.getPackets().sendGameMessage("You have already participated this week.", true);
				}
			} else if (componentId == OPTION_2) {
				stage = 1;
			}
 		} else if (stage == 1) {
 			end ();
 		}
	}

	@Override
	public void finish() {
		// TODO Auto-generated method stub
		
	}
	
}
